unit g;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Label1: TLabel;
    procedure Edit1KeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
   begin
   ClickedOK := InputQuery('Procura','Expressao', mtemp);
   if not (clickedOK) or (mtemp = '') then
      exit;
   fdados.clientes.Next;
   fdados.clientes.DisableControls;
   while not fdados.clientes.eof do
    begin
         if pos(uppercase(mtemp),uppercase(fdados.clientesnome.value)) > 0 then
            break;
         fdados.clientes.next;
   end;
   fdados.clientes.enablecontrols;
   exit;
close;
end;

end.
